package com.lleice.common.entity.base;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 
 * @author lizihao
 *
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel("通用实体")
public class CommonEntity implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8892023780309097962L;

	@TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    
    @ApiModelProperty(value = "创建者")
    @TableField(value = "create_by" ,fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time" ,fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改者")
    @TableField(value = "update_by" ,fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(timezone = "GMT+8", shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "0-启用,1-禁用")
    @TableField(value = "is_enable",fill = FieldFill.INSERT)
    private Integer isEnable;
    
    @ApiModelProperty(value = "0-正常,1-删除")
    @TableField(value = "is_delete",fill = FieldFill.INSERT)
    private Integer isDelete;

}
